#include <iostream>
#include <vector>
using namespace std;
//dfs
void dfsSum(vector<int>& v, int n, int m, int begin){
    if(m == 0){
        for(int i = 0; i < v.size(); ++i)
            (i==0) ? cout<<v[i] : cout<<' '<<v[i];
        cout << endl;
    }
    for(int i = begin; i <= n && i <= m; ++i){
        v.push_back(i);
        dfsSum(v, n, m-i, 1+i);
        v.pop_back();   //清空
    }
}

int main()
{
    int n, m;
    while(cin>>n>>m){
        vector<int> v;
        dfsSum(v, n, m, 1);
    }
    return 0;
}